<template>
  <div id="app">
    <top-toast :list="toasts" />
    <keep-alive>
      <router-view class="app-view"/>
    </keep-alive>
  </div>
</template>

<script>
import { createNamespacedHelpers } from 'vuex'
import { TopToast } from '@/components'

const { mapState } = createNamespacedHelpers('Toast')

export default {
  name: 'App',
  components: { TopToast },
  computed: { ...mapState(['toasts']) }
}
</script>

<style lang="stylus">
@import url('./assets/style/reset.css');

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: $font-color;
  font-size: 18px;
  background-color: $app-bgc;
}
</style>
